package com.clayecloud.module_identitycard.entity;

import android.graphics.Bitmap;
import android.widget.ImageView;

import androidx.databinding.BindingAdapter;

public class IDCard {

    private String cardText;

    private String cardID;

    private String cardUserName;

    private String cardCreatTime;

    private String cardAdress;

    private Bitmap QRcode;

    public IDCard(String cardText, String cardID, String cardUserName, String cardCreatTime, String cardAdress, Bitmap QRcode) {
        this.cardText = cardText;
        this.cardID = cardID;
        this.cardUserName = cardUserName;
        this.cardCreatTime = cardCreatTime;
        this.cardAdress = cardAdress;
        this.QRcode = QRcode;
    }

    public IDCard() {
    }

    public String getCardText() {
        return cardText;
    }

    public void setCardText(String cardText) {
        this.cardText = cardText;
    }

    public String getCardID() {
        return cardID;
    }

    public void setCardID(String cardID) {
        this.cardID = cardID;
    }

    public String getCardUserName() {
        return cardUserName;
    }

    public void setCardUserName(String cardUserName) {
        this.cardUserName = cardUserName;
    }

    public String getCardCreatTime() {
        return cardCreatTime;
    }

    public void setCardCreatTime(String cardCreatTime) {
        this.cardCreatTime = cardCreatTime;
    }

    public String getCardAdress() {
        return cardAdress;
    }

    public void setCardAdress(String cardAdress) {
        this.cardAdress = cardAdress;
    }

    public Bitmap getQRcode() {
        return QRcode;
    }

    public void setQRcode(Bitmap QRcode) {
        this.QRcode = QRcode;
    }

    @BindingAdapter({"coverPhoto"})
    public static void getCoverPhoto(ImageView view, Bitmap cover_photo){
        view.setImageBitmap(cover_photo);
    }
}
